<app-header title="确认订单"></app-header>

<ion-content>
  <div class="order">
      <ul class="w96">
        <li>
          <div class="order-cona">
            <div class="divimg">
              <img *ngIf="order" [src]="order.homeProductImg" alt="">
            </div>

            <div class="order-div">
              <h4 *ngIf="order">{{order.productName}}</h4>
              <p *ngIf="order">价格:<span>{{order.productUnitPrice}}</span>金币/<i *ngIf="order.coinType !== 'bzz'">T</i><i *ngIf="order.coinType == 'bzz'">节点</i></p>
            </div>
          </div>
        </li>

        <li>
          <div class="order-conb">
            <p *ngIf="userInfo">当前余额：{{userInfo.coin}}个</p>
            <span [routerLink]="['/recharge']" routerLinkActive="router-link-active" >去充值</span>
          </div>
        </li>

        <li>
          <div class="order-conc">
            <div class="df_ja">
              <ion-input type="number" [(ngModel)]="num" (ionChange)="onChange()" placeholder="请输入购买数量"></ion-input>
              <!-- <input type="text" placeholder="请输入购买数量"> -->
              <i *ngIf="order.coinType !== 'bzz'">T</i><i *ngIf="order.coinType == 'bzz'">节点</i>
            </div>
            
            <p>总价： {{total}} 金币</p>
          </div>
        </li>
      </ul>

      <!-- <button [routerLink]="['/mine/payresult']" routerLinkActive="router-link-active"  class="blue mar-t5">确认购买</button> -->
      <button class="button buttons" (click)="confirm()">确认购买</button>

  </div>

  <!-- 输入密码 -->
  <div class="password-inp" *ngIf="pwflag">
    <div class="pass-h">
      <div class="pass-head">
        <ion-icon name="close-outline"></ion-icon>
        <h3>请输入密码</h3>
        <ion-icon (click)="closepw()" class="block" name="close-outline"></ion-icon>
      </div>

      <code-input
              (codeCompleted)="onCodeCompleted($event)">
      </code-input>
    </div>
  </div>

  <app-lodding [falg]="show"></app-lodding>
</ion-content>
